package spec.zhangyuehua.$05;

import java.util.ArrayList;

/**
 * Created by yue on 2017/11/9.
 */
public class ArrayListTest {
    public static void main(String[] args) {
        //ArrayList<String>   泛型       它是固定类型
        ArrayList a=new ArrayList();
        System.out.println(a.size());
        a.add('a');
        a.add('b');
        a.add("c");
        a.add(1);
        //集合数据类型可以不同
        System.out.println(a.size());
        //取代
        a.set(3,'c');
        System.out.println(a.get(2)); //获取
        a.remove(1);//删除数值位
    }
}
